package com.jiangwh.domain.security;

import java.util.TreeMap;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.springframework.stereotype.Service;

@Service("basicAuthAuthorizationInterceptor")
public class BasicAuthAuthorizationInterceptor extends
		AbstractPhaseInterceptor<Message> {

	public BasicAuthAuthorizationInterceptor() {
		super(Phase.PRE_INVOKE);
	}

	@Override
	public void handleMessage(Message message) throws Fault {
		Object headers = message.get(Message.PROTOCOL_HEADERS);
		@SuppressWarnings({ "unchecked", "unused" })
		TreeMap<String, Object> map = (TreeMap<String, Object>) headers;
		//do check
		
	}
	
}
